package controller

import (
	"device-admin/internal/app/web/service/public"
	"device-admin/internal/dal"
	"device-admin/internal/dao"

	"192.168.1.75/go-pkg/logx"
	"192.168.1.75/go-pkg/response"
	"github.com/gin-gonic/gin"
)

type Public struct{}

// LocationDistribution 设备位置分布
func (Public) DeviceLocationDistribution(c *gin.Context) {
	list := public.LocationDistribution()
	response.JSON(c, map[string]interface{}{
		"list": list,
	}, nil)
}

func (Public) TraceTest(c *gin.Context) {
	spanCtx := logx.Start(c.Request.Context(), "TraceTest")
	defer logx.End(spanCtx)
	dao.Device{}.Exists(spanCtx, dal.Q, "XS008")
	logx.Info(spanCtx, "TraceTest")
}
